function Foo(name, age) {
    this.name = name
    this.age = age
    this.class = 'class-1'
}
var f =new Foo('zhangsan',20);
console.log(f);